package com.oop9.oldPilot;

public class Fighter extends Airplane {

	private int warheads;

	public int getWarheads() {
		return warheads;
	}

	public void setWarheads(int warheads) {
		this.warheads = warheads;
	}

	@Override
	public void fly() {
		System.out.println("发现敌机侵犯我军领空，战斗机起飞！");
	}

	@Override
	public void accelerate() {
		System.out.println("起飞成功！机重：" + this.getWeight() + "飞行高度：" + this.getAltitude() + "状态良好");
		System.out.println("武器系统加载完成，空对空导弹数量：" + this.warheads + "发现敌机，开始加速！");
		launch();
	}

	@Override
	public void land() {
		hover();
		System.out.println("敌机败退，准备返航！");
	}

	public void launch() {
		System.out.println("空对空导弹发射！");
	}

	public void hover() {
		System.out.println("低空盘旋！");
	}

	public Fighter(double weight, double altitude, int warheads) {
		super(weight, altitude);
		this.warheads = warheads;
	}

}
